<ng-container *ngIf="hasInputValue">
    <span class="label label-info">有</span>
</ng-container>

<ng-container *ngIf="!hasInputValue">
    <span class="label label-warning">无</span>
</ng-container>